package com.shuwang.user.enums;

/**
 * Created by Administrator on 2017/6/8 0008.
 */
public enum UserMessageType {
    message(1001,"留言"),
    complaints(1002,"投诉"),
    ask(1003,"询问"),
    aftersales(1004,"售后"),
    lookingfor(1005,"求购");

    private final Integer value;
    private final String name;

    private UserMessageType(Integer value, String name){
        this.value = value;
        this.name = name;
    }

    public Integer getValue() {
        return value;
    }

    public String getName() {
        return name;
    }

    public static UserMessageType getByValue(int value ){
        for ( UserMessageType operatorUserMessageType : values() ){
            if( operatorUserMessageType.getValue() == value ){
                return operatorUserMessageType;
            }
        }
        return null;
    }
}
